/*
 * HTTPS GET Example using plain Mbed TLS sockets
 *
 * Contacts the howsmyssl.com API via TLS v1.2 and reads a JSON
 * response.
 *
 * Adapted from the ssl_client1 example in Mbed TLS.
 *
 * SPDX-FileCopyrightText: The Mbed TLS Contributors
 *
 * SPDX-License-Identifier: Apache-2.0
 *
 * SPDX-FileContributor: 2015-2023 Espressif Systems (Shanghai) CO LTD
 */
#include "esp_log.h"
#include "freertos/FreeRTOS.h"

#include "httpClient/httpClient.h"
#include "wifiConfig/wifiConfig.h"
#include "mqttClient/mqttClient.h"


void app_main(void)
{
    wifi_init_sta();
    while(conectFlag == 0)
    {
        vTaskDelay(1000 / portTICK_PERIOD_MS);
    }
    ESP_LOGI("TAG", "WIFI connet success");
    xTaskCreate(&get_weather_task, "get_weather_task", 8192, NULL, 5, NULL);
    xTaskCreate(&rec_analyze_http_data_task, "weather_analyze_task", 8192, NULL, 5, NULL);

    xTaskCreate(&TaskMqtt, "mqtt_task", 8192, NULL, 5, NULL);
}
